package com.yzp.zk_lock;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @title: OrderNumGenerator
 * @Author: yzp
 * @Date: 2019/7/7 10:05
 * @Version 1.0
 */
public class OrderNumGenerator {
    //区分不同的订单号
    private static int count = 0;

    public String getNumber() {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return simpleDateFormat.format(new Date()) +"-"+ ++count;
    }
}
